package com.kun.lagou.order.api;

import com.kun.lagou.order.api.dto.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Optional;

/**
 * @author Administrator
 */
@FeignClient(value = "order-service", contextId = "order-service")
public interface OrderApi {

    @PostMapping("/order/create-order")
    OrderInfo createOrder(@RequestBody OrderInfo orderInfo);

    @GetMapping("/order/getByOutOrderId")
    Optional<OrderInfo> getByOutOrderId(@RequestParam("outOrderId") String outOrderId);


}
